// TradeServer.h: interface for the CTradeServer class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_TRADESERVER_H__A9D09629_8262_4181_A7F1_A3F3CD564180__INCLUDED_)
#define AFX_TRADESERVER_H__A9D09629_8262_4181_A7F1_A3F3CD564180__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "TCPSocketServer.h"
#include "Thread.h"

class CTradeServer: public Thread, public IDWCallback  
{
public:
	void CallHs(HANDLE &m_hMutex);
	bool &InitializeTradeServer();
    virtual ~CTradeServer();

protected:
	HANDLE m_hMutex;
	void OnReceivePacket(const char* packet, HANDLE &m_hMutex);
	void CallHSAPI(const char *packet);
	void SendReport(char * report);
	void run();
	bool flag;
	CComPtr<IComm> m_CommX;
private:
	bool LoadCOM();
	TCPTradeServer *tcpServer;
};

#endif // !defined(AFX_TRADESERVER_H__A9D09629_8262_4181_A7F1_A3F3CD564180__INCLUDED_)
